﻿/**
 * 应收帐务
 */
function getPayOrReceiveWithMeReceive(pageNo){
	$.ajax({
        type: "POST",
        url: contextPath + "/view/accounts/getPayOrReceiveWithMe",
        dataType: "html",
        data: {'pageNo': pageNo, 'pageSize': 10, 'payOrReceive': 1},
        beforeSend: function () {
            $("#maincontent").html("");
            $("#beforeLoading").show();
            timeOutHint();
        },
        success: function (res) {
            if ("" != res) {
                $("#beforeLoading").hide();
                $("#maincontent").html(res);
            }
        },
        error: function(){
        	$("#beforeLoading").hide();
        	failHint();
        }
    });
}



/**
 * 应付帐务
 */
function getPayOrReceiveWithMePay(pageNo){
	$.ajax({
        type: "POST",
        url: contextPath + "/view/accounts/getPayOrReceiveWithMe",
        dataType: "html",
        data: {'pageNo': pageNo, 'pageSize': 10, 'payOrReceive': 0},
        beforeSend: function () {
            $("#maincontent").html("");
            $("#beforeLoading").show();
            timeOutHint();
        },
        success: function (res) {
            if ("" != res) {
                $("#beforeLoading").hide();
                $("#maincontent").html(res);
            }
        },
        error: function(){
        	$("#beforeLoading").hide();
        	failHint();
        }
    });
}


/**
 * 年结转
 */
function getAnnualbalances(){
	$.ajax({
        type: "POST",
        url: contextPath + "/view/accounts/getAnnualbalance",
        dataType: "html",
        data: {},
        beforeSend: function () {
            $("#maincontent").html("");
            $("#beforeLoading").show();
            timeOutHint();
        },
        success: function (res) {
            if ("" != res) {
                $("#beforeLoading").hide();
                $("#maincontent").html(res);
            }
        },
        error: function(){
        	$("#beforeLoading").hide();
        	failHint();
        }
    });
}
